package javaCode.chapter04.练习;

public class DoWhileExercise01 {

    public static void main(String[] args) {

        //打印1-100
        //计算1-100 的和
        int i = 1;
        int sum = 0;
        do {
            System.out.println(i);
            sum+=i;
            i++;
        }while (i<=100);

        System.out.println("sum= "+sum);


        //统计1-200之间能被5整除但不能被3整除的个数
        int j = 0;
        int count= 0;
        do {
            if (j%5==0 && j%3 !=0 ){
                count++;
            }
            j++;
        }while (j<=200);

        System.out.println("count= "+count);
    }
}
